// 类型转换
let val;

//Number to String
val = String(5);
val = String(4 + 4);

//Boolean to String
val = String(true);

//Date to String
val = String(new Date());

//Array to String
val = String[1, 2, 3, 4, 5];

//toString()
val = (555).toString();
val = true.toString();

//String to Number
val = Number('5');

//Bool To Number
val = Number(true); //1
val = Number(false); //0

//NaN
val = Number('hello'); //NaN 不是数值

//另外一种形式
val = parseInt('100.30');
val = parseFloat('100.30');


//输出
console.log(val);
console.log(typeof val);
//Number类型没有长度
// console.log(val.length);
//toFixed保留小数的位数
console.log(val.toFixed(2));



